#include "stdafx.h"
#include "ConstWStr.h"
#include "Impl/ConstStrImpl.h"

using namespace Base::ConstStr;

ConstWStr::ConstWStr()
    : m_impl(0)
{
    m_impl = new ConstStrImpl<std::wstring>;
}

ConstWStr::~ConstWStr()
{
    if (m_impl)
    {
        delete m_impl;
        m_impl = 0;
    }
}

ConstWStr* 
ConstWStr::get()
{
    static ConstWStr theInstance;
    return &theInstance;
}
        
const std::wstring* 
ConstWStr::string(const std::wstring& str)
{
    return m_impl->string(str);
}